<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Dubbo,Motan,RPC," />








  <link rel="shortcut icon" type="image/x-icon" href="/blog/favicon.ico?v=5.1.0" />






<meta name="description" content="Dubbo通信协议，连接方式 Dubbo支持自定义的RPC协议，因此冗余字段少；通信性能高。 DUbbo默认的是所有的服务共享单一的TCP长连接。因此服务接口不适合传输大数据。因为接口负载一大，容易堵塞其他服务。  序列化方式 默认序列化方式为：hessian2 Dubbo自定义序列化方案  注册中心 默认使用Zookeeper作为注册中心  缓冲区Dubbo默认采用的是heap缓冲区，因此在So">
<meta name="keywords" content="Dubbo,Motan,RPC">
<meta property="og:type" content="article">
<meta property="og:title" content="Dubbo、Motan、SpringCloud的区别">
<meta property="og:url" content="https://gitee.com/shuhao/2018/05/22/Dubbo、Motan、SpringCloud的区别/index.html">
<meta property="og:site_name" content="Niki">
<meta property="og:description" content="Dubbo通信协议，连接方式 Dubbo支持自定义的RPC协议，因此冗余字段少；通信性能高。 DUbbo默认的是所有的服务共享单一的TCP长连接。因此服务接口不适合传输大数据。因为接口负载一大，容易堵塞其他服务。  序列化方式 默认序列化方式为：hessian2 Dubbo自定义序列化方案  注册中心 默认使用Zookeeper作为注册中心  缓冲区Dubbo默认采用的是heap缓冲区，因此在So">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-05-24T00:55:14.831Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Dubbo、Motan、SpringCloud的区别">
<meta name="twitter:description" content="Dubbo通信协议，连接方式 Dubbo支持自定义的RPC协议，因此冗余字段少；通信性能高。 DUbbo默认的是所有的服务共享单一的TCP长连接。因此服务接口不适合传输大数据。因为接口负载一大，容易堵塞其他服务。  序列化方式 默认序列化方式为：hessian2 Dubbo自定义序列化方案  注册中心 默认使用Zookeeper作为注册中心  缓冲区Dubbo默认采用的是heap缓冲区，因此在So">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Mist',
    sidebar: {"position":"right","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://gitee.com/shuhao/2018/05/22/Dubbo、Motan、SpringCloud的区别/"/>





  <title> Dubbo、Motan、SpringCloud的区别 | Niki </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?cb9f0585e406f878cb2f29c89ad3cdb7";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>










  
  
    
  

  <div class="container one-collumn sidebar-position-right page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Niki</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">天道酬勤</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-categories"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://gitee.com/shuhao/blog/2018/05/22/Dubbo、Motan、SpringCloud的区别/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Fang ShuHao">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/head.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Niki">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Dubbo、Motan、SpringCloud的区别
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-05-22T15:02:32+08:00">
                2018-05-22
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/RPC/" itemprop="url" rel="index">
                    <span itemprop="name">RPC</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="Dubbo"><a href="#Dubbo" class="headerlink" title="Dubbo"></a>Dubbo</h2><h4 id="通信协议，连接方式"><a href="#通信协议，连接方式" class="headerlink" title="通信协议，连接方式"></a>通信协议，连接方式</h4><ul>
<li>Dubbo支持自定义的RPC协议，因此冗余字段少；通信性能高。</li>
<li>DUbbo默认的是所有的服务共享单一的TCP长连接。因此服务接口不适合传输大数据。因为接口负载一大，容易堵塞其他服务。</li>
</ul>
<h4 id="序列化方式"><a href="#序列化方式" class="headerlink" title="序列化方式"></a>序列化方式</h4><ul>
<li>默认序列化方式为：hessian2</li>
<li>Dubbo自定义序列化方案</li>
</ul>
<h4 id="注册中心"><a href="#注册中心" class="headerlink" title="注册中心"></a>注册中心</h4><ul>
<li>默认使用Zookeeper作为注册中心</li>
</ul>
<h4 id="缓冲区"><a href="#缓冲区" class="headerlink" title="缓冲区"></a>缓冲区</h4><p>Dubbo默认采用的是heap缓冲区，因此在Socket通信时，难免存在内核缓冲区到heap缓冲区的复制消耗。并且在进行PRC协议解析（拆包/粘包）、序列化解析等处理上也处在heap堆内存的复制。</p>
<h2 id="Motan"><a href="#Motan" class="headerlink" title="Motan"></a>Motan</h2><h2 id="SpringCloud"><a href="#SpringCloud" class="headerlink" title="SpringCloud"></a>SpringCloud</h2><h4 id="通信协议"><a href="#通信协议" class="headerlink" title="通信协议"></a>通信协议</h4><ul>
<li>SpringCloud采用的是HTTP通信协议。HTTP通信协议有两点影响性能的地方。</li>
</ul>
<ol>
<li>HTTP通信协议的头信息比较多</li>
<li>HTTP通信协议采用的是文本作为传输对象，对比其他二进制流作为传输载体的协议，也会花费更多的网络带宽</li>
</ol>
<h4 id="SpringCloud的全"><a href="#SpringCloud的全" class="headerlink" title="SpringCloud的全"></a>SpringCloud的全</h4><p>SpringCloud除了分布式服务调用框架外，还集成了整个微服务体系例如：</p>
<ul>
<li>分布式配置文件中心：SpringCloud Config</li>
<li>路由，负载： zuul、ribbo</li>
<li>断路器： Hystrix</li>
<li>服务注册发现 Eureka、SpringCloud Consul</li>
<li>….<br>所以SpringCloud相对于Dubbo这个相对单一的分布式服务调用框架来说，拥有十分健全的微服务体系，能够方便的快速的开发微服务。</li>
</ul>
<p>Spring Cloud，一些开发的第一印象是http+JSON的rest通信，性能上难堪重用。http协议的通信对于应用的负载量会否真正成为瓶颈点（Spring Cloud也并不是和http+JSON强制绑定的，如有必要Thrift、protobuf等高效的RPC、序列化协议同样可以作为替代方案）</p>
<h2 id="微服务治理原则"><a href="#微服务治理原则" class="headerlink" title="微服务治理原则"></a>微服务治理原则</h2><ul>
<li>流量控制：动态、静态流量控制</li>
<li>服务降级</li>
<li>超时控制</li>
<li>优先级调度</li>
<li>流量迁移</li>
<li>调用链跟踪和分析</li>
<li>服务路由</li>
<li>服务上线审批，下线通知</li>
<li>SLA策略控制</li>
</ul>
<h2 id="分布式服务框架性能点"><a href="#分布式服务框架性能点" class="headerlink" title="分布式服务框架性能点"></a>分布式服务框架性能点</h2><ol>
<li><p>序列化方式：<br>不同序列化计算时占用的<strong>CPU资源</strong>；以及序列化时需要的<strong>内存资源</strong>；序列化后数据量的大小影响网络传输中带<strong>宽资源</strong>。<br>方案：Google的protocol buffer；FB的thrift；hessian；java本身序列化；json</p>
</li>
<li><p>服务调用方式<br>服务提供方通过反射调用具体服务时，反射本身对性能的影响</p>
</li>
<li><p>通信协议<br>不同通信协议冗余搭建字段不同，传输数据量不同，占用的网络带宽资源不同</p>
</li>
<li><p>IO性能</p>
</li>
</ol>
<ol>
<li>线程模型</li>
</ol>
<h2 id="相关问题"><a href="#相关问题" class="headerlink" title="相关问题"></a>相关问题</h2><p>1、默认使用的是什么通信框架，还有别的选择吗?  </p>
<p>2、服务调用是阻塞的吗？  </p>
<p>3、一般使用什么注册中心？还有别的选择吗？  </p>
<p>4、默认使用什么序列化框架，你知道的还有哪些？  </p>
<p>5、服务提供者能实现失效踢出是什么原理？  </p>
<p>6、服务上线怎么不影响旧版本？  </p>
<p>7、如何解决服务调用链过长的问题？  </p>
<p>8、说说核心的配置有哪些？  </p>
<p>9、dubbo推荐用什么协议？  </p>
<p>10、同一个服务多个注册的情况下可以直连某一个服务吗？  </p>
<p>11、画一画服务注册与发现的流程图  </p>
<p>12、集群容错怎么做？  </p>
<p>13、在使用过程中都遇到了些什么问题？  </p>
<p>14、dubbo和dubbox之间的区别？  </p>
<p>15、你还了解别的分布式框架吗？  </p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/Dubbo/" rel="tag"># Dubbo</a>
          
            <a href="/blog/tags/Motan/" rel="tag"># Motan</a>
          
            <a href="/blog/tags/RPC/" rel="tag"># RPC</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/05/22/HashMap如何维护entrySet/" rel="next" title="HashMap如何维护entrySet">
                <i class="fa fa-chevron-left"></i> HashMap如何维护entrySet
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/05/24/Motan源码阅读随记/" rel="prev" title="Motan源码阅读随记">
                Motan源码阅读随记 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
      <div id="lv-container" data-id="city" data-uid="MTAyMC8zNjY5NS8xMzIzMA=="></div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/blog/images/head.jpg"
               alt="Fang ShuHao" />
          <p class="site-author-name" itemprop="name">Fang ShuHao</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/blog/archives">
                <span class="site-state-item-count">135</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-categories">
              <a href="/blog/categories">
                <span class="site-state-item-count">35</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/blog/tags">
                <span class="site-state-item-count">93</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Dubbo"><span class="nav-number">1.</span> <span class="nav-text">Dubbo</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#通信协议，连接方式"><span class="nav-number">1.0.1.</span> <span class="nav-text">通信协议，连接方式</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#序列化方式"><span class="nav-number">1.0.2.</span> <span class="nav-text">序列化方式</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#注册中心"><span class="nav-number">1.0.3.</span> <span class="nav-text">注册中心</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#缓冲区"><span class="nav-number">1.0.4.</span> <span class="nav-text">缓冲区</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Motan"><span class="nav-number">2.</span> <span class="nav-text">Motan</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#SpringCloud"><span class="nav-number">3.</span> <span class="nav-text">SpringCloud</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#通信协议"><span class="nav-number">3.0.1.</span> <span class="nav-text">通信协议</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#SpringCloud的全"><span class="nav-number">3.0.2.</span> <span class="nav-text">SpringCloud的全</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#微服务治理原则"><span class="nav-number">4.</span> <span class="nav-text">微服务治理原则</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#分布式服务框架性能点"><span class="nav-number">5.</span> <span class="nav-text">分布式服务框架性能点</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#相关问题"><span class="nav-number">6.</span> <span class="nav-text">相关问题</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Fang ShuHao</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    
    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  



  
  

  

  

  

  


  

</body>
</html>
